﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WebFormReservation.aspx.cs" Inherits="TravelAgency.WebFormReservation" %>
<asp:Content ID="ContentHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="ContentBody" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <div runat="server" id="DivReservations">
        <asp:UpdatePanel runat="server" ID="UpdatePanelGuarantee">
            <ContentTemplate>
                <asp:Panel ID="PanelGuarantee" runat="server" GroupingText="Guarantee">
                    First name: <asp:TextBox ID="GuaranteeFirstName" runat="server"></asp:TextBox> 
                    <asp:RequiredFieldValidator ID="GuaranteeFirstNameValidator" runat="server" Text="*" 
                        ControlToValidate="GuaranteeFirstName" ForeColor="Red" ValidationGroup="Guarantee"
                        SetFocusOnError ="true"></asp:RequiredFieldValidator> <br />
                    Last name: <asp:TextBox ID="GuaranteeLastName" runat="server"></asp:TextBox> 
                    <asp:RequiredFieldValidator ID="GuaranteeLastNameValidator" runat="server" Text="*" 
                        ControlToValidate="GuaranteeLastName" ForeColor="Red" ValidationGroup="Guarantee"
                        SetFocusOnError ="true"></asp:RequiredFieldValidator> <br />
                    Passport number: <asp:TextBox ID="GuaranteePassportNumber" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="GuaranteePassportValidator" runat="server" Text="*" 
                        ControlToValidate="GuaranteePassportNumber" ForeColor="Red" ValidationGroup="Guarantee"
                        SetFocusOnError ="true"></asp:RequiredFieldValidator> <br />
                        Number of attenders: <asp:Label ID="LabelNumerOfAttenders" runat="server">1</asp:Label> <br />
                        Total price: <asp:Label ID="LabelTotalPrice" runat="server" Text=""></asp:Label>
                </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>

        <asp:UpdatePanel runat="server" ID="UpdatePanelAttender">
            <ContentTemplate>
                <asp:Panel ID="PanelAttender" runat="server" GroupingText="Attender">
                    First name: <asp:TextBox ID="TextBoxFirstNameAtt" runat="server"></asp:TextBox>  <br />
                    Last name: <asp:TextBox ID="TextBoxLastNameAtt" runat="server"></asp:TextBox>  <br />
                    Passport number: <asp:TextBox ID="TextBoxPassportAtt" runat="server"></asp:TextBox> <br />
                    <asp:Button ID="ButtonAddAttender" runat="server"  Text="Add" 
                        onclick="ButtonAddAttender_Click" />
                </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>
        
        <asp:Button ID="ButtonMakeReservation" runat="server" Text="Make reservation" 
            onclick="ButtonMakeReservation_Click" />
        <asp:Button ID="ButtonCancel" runat="server" Text="Cancel" 
            onclick="ButtonCancel_Click"/>
        </div>
        <div runat="server" id="DivSuccess">
            Reservation made successfuly! <br />
            <asp:Button ID="ButtonOK" runat="server" Text="OK" onclick="ButtonOK_Click" />            
        </div>
        </asp:Content>
